package com.ctsi.system.app.rest.response;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.io.Serializable;
import java.util.List;

/**
 * 字典树懒加载响应VO
 * @author: zhangjw
 * @Date: 2018/10/8 11:04
 * @Description:
 */
public class DictTreeDataResponse implements Serializable {
    private static final long serialVersionUID = 5183139236319286090L;

    private String id;

    private String parentId;

    private String name;

    private String code;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<DictTreeDataResponse> children = null;

    private boolean leaf;

    public DictTreeDataResponse() {
    }

    public DictTreeDataResponse(String id, String parentId, String name, String code, List<DictTreeDataResponse> children) {
        this.id = id;
        this.parentId = parentId;
        this.name = name;
        this.code = code;
        this.children = children;
    }

    public DictTreeDataResponse(String id, String parentId, String name, String code,boolean leaf, List<DictTreeDataResponse> children) {
        this.id = id;
        this.parentId = parentId;
        this.name = name;
        this.code = code;
        this.children = children;
        this.leaf = leaf;
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return this.parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public List<DictTreeDataResponse> getChildren() {
        return this.children;
    }

    public void setChildren(List<DictTreeDataResponse> children) {
        this.children = children;
    }

    public void setLeaf(boolean leaf) {
        this.leaf = leaf;
    }

    public boolean isLeaf() {
        return leaf;
    }
}
